home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 010 / games.arc / HEARING.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1980-01-01  |  1.2 KB  |  36 lines

  1. 10  KEY OFF: CLS: LOCATE 1,22: PRINT "HEARING EVALUATION"
  2. 20   LOCATE 2,24: PRINT "E. WEISSBERGER"
  3. 30  LOCATE 3,24: PRINT "version 6-15-82"
  4. 40  COLOR 0,7,0
  5. 50  PRINT " While this evaluation may be interesting, it is not a medically "
  6. 60  PRINT "                   sound evaluation.                             "
  7. 70  COLOR 7,0,0
  8. 80  PRINT
  9. 90  PRINT "You will hear a tone (or not hear it) depending on your hearing."
  10. 100  PRINT "Your response will be monitored to control tone frequency."
  11. 110  COLOR 0,7,0
  12. 120  PRINT " Indicate that you hear the tone by typing Y "
  13. 130  COLOR 7,0,0
  14. 140  LOCATE 15,15: PRINT "Type any key to continue"
  15. 150  A$ = INKEY$: IF A$ = "" THEN 150 ELSE 160
  16. 160  CLS: INPUT "What is your first name? ",N$
  17. 170  FOR I = 1 TO 1000: NEXT I
  18. 180  R = 1000: S = 125
  19. 190  FOR I = 5 TO 30 STEP 1
  20. 200  TIME$ = "00:00:00"
  21. 210  SOUND I*R,50
  22. 220  A$ = INKEY$: IF A$ = "" AND TIME$ < "00:00:05" THEN 220 ELSE IF A$ = "Y" OR A$ = "y" GOTO 240 ELSE IF TIME$ => "00:00:05" THEN GOTO 230
  23. 230  F1 = I - 1: I = 30
  24. 240  NEXT I
  25. 250  FOR J = 1 TO 7
  26. 260  TIME$ = "00:00:00"
  27. 270  SOUND (F1*R + J*S),50
  28. 280  A$ = INKEY$: IF A$ = "" AND TIME$ < "00:00:05" THEN 280 ELSE IF A$ = "Y" OR A$ = "y" GOTO 300 ELSE IF TIME$ => "00:00:05" THEN GOTO 290
  29. 290  F2 = J - 1: J = 7
  30. 300  NEXT J
  31. 310  FR = R*F1 + S*F2
  32. 320  PRINT USING "&, your upper hearing limit is ##### hertz ";N$,FR
  33. 330  PRINT
  34. 340  PRINT "Will you run this program again (Y/N)?"
  35. 350  A$ = INKEY$: IF A$ = "" THEN 350 ELSE IF A$ = "Y" OR A$ = "y" THEN CLS: GOTO 190 ELSE CLS: KEY ON: END
  36.